version 17.0
clear
set more off

cd "INSERT PATH TO WORKING DIRECTORY HERE"

***		THIS MODULE CREATES SUMMARY STATS BASED ON WEEKLY HPS DATA		***

use "PULSE_complete.dta", clear

keep if WEEK>12 & WEEK<=40

*** 	DATA FOR PAPER ON LINK WITH SOCIAL INSURANCE, MARCH 2022		***
/*Table 1 */
table RACEETH [pw=PWEIGHT] if WEEK>12 & WEEK<=40, stat(mean HHOUSES) nformat(%9.4f) nototals
table RACEETH [pw=PWEIGHT] if WEEK>12 & WEEK<=40 & HHOUSES==1, stat(mean SOURCESPEND4) nformat(%9.4f) nototals

/* Table 2 */
table HHOUSES [pw=PWEIGHT] if WEEK>12 & WEEK<=40 & EIPRECEIPT==1, stat(mean EIPSAVE) nototals
table HHOUSES [pw=PWEIGHT] if WEEK>12 & WEEK<=40 & CTCRECEIPT==1, stat(mean CTCSAVE) nototals

*** 				UPDATES FOR RSE PAPER, NOVEMBER 2022				***

table EIPRECEIPT [pw=PWEIGHT] if WEEK>12 & WEEK<=40 & HHOUSES==1, stat(mean CURRMORT) nototals

table RACEETH2 EIPRECEIPT [pw=PWEIGHT] if WEEK>12 & WEEK<=40 & HHOUSES==1, stat(mean CURRMORT) nototals

table month EIPRECEIPT [pw=PWEIGHT] if WEEK>12 & WEEK<=40 & HHOUSES==1, stat(mean CURRMORT) nototals

table EIPRECEIPT CURRMORT [pw=PWEIGHT] if WEEK>12 & WEEK<=40 & HHOUSES==1, stat(mean SOURCESPEND4) nototals

table RACEETH2 EIPRECEIPT CURRMORT [pw=PWEIGHT] if WEEK>12 & WEEK<=40 & HHOUSES==1, stat(mean SOURCESPEND4) nototals

table EIPRECEIPT [pw=PWEIGHT] if WEEK>12 & WEEK<=40 & HHOUSES==1, stat(mean THHLD_NUMPER) nototals

table RACEETH2 EIPRECEIPT [pw=PWEIGHT] if WEEK>12 & WEEK<=40 & HHOUSES==1, stat(mean THHLD_NUMPER) nototals

table EIPRECEIPT SOURCESPEND4 [pw=PWEIGHT] if WEEK>12 & WEEK<=40 & HHOUSES==1, stat(mean DIFFEXPNS) nototals

table RACEETH2 EIPRECEIPT SOURCESPEND4 [pw=PWEIGHT] if WEEK>12 & WEEK<=40 & HHOUSES==1, stat(mean DIFFEXPNS) nototals

table RACEETH2 [pw=PWEIGHT] if WEEK>12 & WEEK<=40 & EIPRECEIPT==1, stat(mean EIPSAVE)

table RACEETH2 [pw=PWEIGHT] if WEEK>12 & WEEK<=40 & CTCRECEIPT==1, stat(mean CTCSAVE)


